Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Working With the StdPix Function


StdPix

The Image Compression Manager lets you invoke QuickDraw's StdPix function as follows:

pascal void StdPix (PixMapPtr src, const  Rect *srcRect,
                     MatrixRecordPtr matrix, short mode, 
                     RgnHandle mask, PixMapPtr matte, 
                     Rect *matteRect, short flags);
src
Contains a pointer to a pixel map containing the image to draw. Use the GetCompressedPixMapInfo function (described on page 3-135) to retrieve information about this pixel map.
srcRect
Points to a rectangle defining the portion of the image to display. This rectangle must lie within the boundary rectangle of the compressed image or within the source image. If this parameter is set to nil, the entire image is displayed.
matrix
Contains a pointer to a matrix structure that specifies the mapping of the source rectangle to the destination. It is a fixed-point, 3-by-3 matrix. This roughly corresponds to the dstRect parameter to QuickDraw's StdBits routine. See the chapter "Movie Toolbox" in this book for more information about matrix operations.
mode
Specifies the transfer mode for the operation. The Image Compression Manager supports the same transfer modes supported by QuickDraw's CopyBits routine.
Note that this parameter also controls the accuracy of any decompression operation that may be required to display the image. If bit 7 (0x80) of the mode parameter is set to 1, the StdPix function sets the decompression accuracy to codecNormalQuality. If this bit is set to 0, the function sets the accuracy to codecHighQuality.
mask
Contains a handle to a clipping region in the destination coordinate system. If specified, the compressor applies this mask to the destination image. If there is no mask, this parameter is set to nil.
matte
Points to a pixel map that contains a blend matte. The blend matte
causes the decompressed image to be blended into the destination pixel map. The matte can be defined at any supported pixel depth--the matte depth need not correspond to the source or destination depths. However, the matte must be in the coordinate system of the source image. If there is no matte, this parameter is set to nil.
The matte may be compressed. Use the GetCompressedPixMapInfo function (described on page 3-135) to determine if the matte pixel map contains compressed data.
matteRect
Contains a pointer to a rectangle defining a portion of the blend matte to apply. This parameter is set to nil if there is no matte or if the entire matte is to be used.
flags
Contains control flags. The following flags are available:
callOldBits
If this flag is set, then the StdPix function calls QuickDraw's bitsProc routine with the decompressed image data. A pointer to this routine is located in the bitsProc field of the CQDProcs record. If the bitsProc routine is not customized, then it is not called unless the callStdBits flag is also set. See the description of the CQDProcs record in Inside Macintosh: Imaging for more on the bitsProc routine.
callStdBits

If this flag is set, the callOldBits flag is set, and the CQDProcs record's bitsProc field is set to the StdBits routine, then the StdBits routine is called with the decompressed image data.
noDefaultOpcodes
If this flag is set and a picture is open for writing, the default picture opcodes (for displaying a warning when QuickTime is not installed) are not added to the output picture. This can be useful when storing multiple StdPix opcodes in a single picture.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996